<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<include file="Public:meta" />
    <style>
		#jobtable th,#jobtable td{ padding:1px;}
		#jobtable th{font-weight:bold; text-align:right; width:200px}
	</style>
</head>
<body id="main_page">
<include file="Public:position" />
<div class="container">
    <div class="box">
        <form enctype="multipart/form-data" action="{$Action}" method="post" id="frmSave">
        <input type="hidden" name="{$HiddenName}" value="{$HiddenValue}" />
        <volist name="Group" id="g">
            <div class="box-header"><h4>{$g.DisplayName}</h4></div>
            <div class="box-content">
                <table width="100%" id="jobtable">
                    <volist name="Attribute" id="a">
                        <eq name="a.GroupID" value="$g.AttributeID">
                            <switch name="i">
                            <case value="1"><tr><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></case>
                            <case value="2"><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></case>
                            <case value="3"><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></tr></case>
                            
                            <case value="4"><tr><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></case>
                            <case value="5"><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></case>
                            <case value="6"><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></tr></case>
                            
                            <case value="7"><tr><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></case>
                            <case value="8"><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></case>
                            <case value="9"><th>{$a.DisplayName}</th><td align="left">{$a.html}</td></tr></case>
                            <default/>
                            <tr><th>{$a.DisplayName}</th><td colspan="5" align="left" style="padding-right:12px">{$a.html}</td></tr>
                            </switch>
                        </eq>
                    </volist>
                </table>
            </div>
        </volist>

        <div class="box-footer">
            <div class="box-footer-inner">
                <input  id="btnSubmit" class="marginright"   type="submit" value="保存" />
                <input  id="btnSubmit"  type="button" value="返回" class="GoBack"  onclick="GoBack()" />
            </div>
        </div>
        </form>
      </div>
</div>
</body>
</html>
<script type="text/javascript">
$(document).ready(function(){
	function complete(data){
		CloseLoadBox();
		if (data.status==1){
			SucceedBox(data.info);
		}else{ //添加频道失败
			ErrorBox(data.info);
		}
	};
	
	 $('#frmSave').submit(function(){
		try{
			LoadBox();
			for ( s in CKEDITOR.instances ) {
			   CKEDITOR.instances[s].updateElement();
			}
		}catch(e){
			;
		}finally{
			$(this).ajaxSubmit( {success: complete,dataType: 'json'} );
			return false;  //为了防止普通浏览器进行表单提交和产生页面导航（防止页面刷新？）返）返回false  
		} 
	 });
	 
	 $('#JobName').focus();
});
</script>